<?php

/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/**
 * Description of login
 *
 * @author james
 */
class Login extends CI_Controller {
    //put your code here
     private $main_controler;

    private $idioma;

    private $arquivosJs = array(
        'https://ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.min.js',
        'https://ajax.googleapis.com/ajax/libs/jqueryui/1.8.16/jquery-ui.min.js',
        'index.js'

    );

    private $arquivosCss = array(
        'index.css',
        'estrutura.css',
        'ui/jquery.ui.all.css',
        'resets.css',
        'estilos.css',
        'login.css');

    function __construct() {
        parent::__construct();


        $linguagem = $this->input->get('linguagem');


        if($linguagem == "pt_br"){

            $this->lang->load('portugues_br', 'portugues_br');

        }else if($linguagem == "en_us"){

            $this->lang->load('english', 'english');

        }else{

            $this->lang->load('portugues_br', 'portugues_br');

        }
        $this->idioma =  $this->lang->language;

        $this->main_controler['title'] = $this->idioma['txt_title_login'];
        $this->main_controler['data'] = array();
        $this->main_controler['controller'] = array('login',array());

        $this->template->setCss($this->arquivosCss);
        $this->template->setJs($this->arquivosJs);
    }

    function index(){

        $this->template->loadTemplate($this->main_controler,  $this->idioma, true);
    }

    function logar(){
        $this->load->model('systemlogin');

        $this->systemlogin->logar();
    }
}

?>
